1. Field of the Invention
This invention relates to the field of microprocessors and, more particularly, to integer operation circuits within microprocessors.
2. Description of the Relevant Art
Many modern microprocessors are configured to perform integer operations upon relatively wide operands. For example, 32 bit or even 64 bit operands are becoming common. The wide operand sizes allow for a high degree of accuracy in computations performed thereon. As used herein, an integer operation refers to a mathematical or logical operation performed upon an integer value or values. For example, addition, multiplication, and logical shifting are integer operations. The term operand refers to a value used as an input to an operation such as an integer operation. The operation operates upon the operands to produce a result (i.e. an addition operation may take two or more input operands, producing a result which is the sum of the operands).
An exemplary type of data which may require wide operand sizes for precise calculations is audio data. Compact-disk quality audio data may employ 32 bit operands for precision signal processing computations upon 16 bit audio samples. It is noted that 18-20 bits may be sufficient for performing audio data computations, but general purpose microprocessors are typically configured with arithmetic processing elements (e.g. adders, multipliers) which operate upon operands having a width in bits equal to a power of two.
Other types of data may require less precision. For example, video data is often manipulated in four or eight bit quantities. A particular pixel may be represented as four or eight bits of red color intensity, four or eight bits of green color intensity, and four or eight bits of blue color intensity. When operating upon these four or eight bit quantities, portions of the arithmetic processing elements included in a general purpose microprocessor are unused. For example, a four bit addition being performed by a 32 bit adder circuit does not use the high order 28 bits of the adder circuit. The high order 28 bits of the adder circuit add zeros, and are wasted during the addition of the four bit values. The bits not used in the four or eight bit computations are effectively wasted during manipulations of the narrower-width data. As used herein, the term "high order" refers to bits which are most significant in a particular value. The term "low order" refers to bits which are least significant in a particular value.
Operating upon video data is often an inherently parallel process. For example, it is natural to operate upon the red, green, and blue color intensities of a pixel in parallel, since a similar operation may be applied to each color. Additionally, pixels which are located nearby may be operated upon in a similar manner. Because similar operations may be performed upon a variety of values, single instruction, multiple data (SIMD) architectures have been proposed. These architectures cause multiple independent data values to be operated upon simultaneously according to a particular instruction. Unfortunately, such architectures are limited to the relatively narrow operand widths selected for the SIMD instructions. SIMD architectures do not process wider operands efficiently.
It is increasingly common in many applications, such as signal processing applications, for a single microprocessor to operate upon several vastly different data types. Because the data types may require different amounts of accuracy, a particular microprocessor may be more or less efficient at performing the processing. A SIMD-type microprocessor may not be capable of efficiently processing wide operands, while a wide operand processor may not be capable of efficiently processing SIMD-type data. A microprocessor which is efficient at performing calculations upon many different data types and widths is desired.